Skip to content

Fix docstrings #27621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 28, 2019
Merged

Conversation

albertvillanova
Copy link
Contributor

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

This fixes some docstring formatting issues: e.g. some deprecated directives do not appear in current docs because the two colons are missing .. deprecated 0.25.0.

@jreback
Copy link
Contributor

jreback commented Jul 27, 2019

odd that the doc string checks don’t catch this
don’t mind fixing these - but should put in place in validate_docstrings.py

@datapythonista

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @albertvillanova for this, nice fixes.

It feels like sphinx should be raising warnings for those, but I guess both sphinx and our script consider those as just part of a paragraph.

Can you leave the CI green (I guess the failure is unrelated to this PR, and you can simply merge master or add an empty commit).

And also, if you can open an issue to validate those automatically, and may be work on adding validation for this in the scripts/validate_docstrings.py script, that would be great.

@jreback jreback added the Docs label Jul 27, 2019
@albertvillanova
Copy link
Contributor Author

@datapythonista

It feels like sphinx should be raising warnings for those, but I guess both sphinx and our script consider those as just part of a paragraph.

2 dots followed by text (and no 2 colons) are valid reST comments, thus ignored by the parser: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#comments

@datapythonista
Copy link
Member

Thanks @albertvillanova, that's good to know. I think then we should make sure in scripts/validate_docstrings.py that we don't find "comments" that start with one of the keywords that we know won't be comments (deprecated, versionadded,...).

If you don't mind creating an issue for that, and referencing this PR in it, so we can see where it came from, that would be great.

And thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants